package com.daidai.activitys

import com.App
import com.daidai.base.BaseActivity
import com.daidai.spinner.R
import com.tencent.mm.opensdk.modelmsg.SendAuth

class WXLoginActivity : BaseActivity() {
    override fun getContentViewResId(): Int = R.layout.activity_wxlogin

    override fun initView() {

        findBtn(R.id.btnLogin).setOnClickListener {
            if (!App.wxApi.isWXAppInstalled){
                App.toast("您还未安装微信客户端!")
                return@setOnClickListener
            }

            val seq = SendAuth.Req()
            seq.scope = "snsapi_userinfo"
            seq.state = "ttjb_wx_login"
            App.wxApi.sendReq(seq)
        }
    }

    override fun initData() {
    }
}